﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using TrainingWorkshop.Model;
using TrainingWorkshop.DALFactory;
using TrainingWorkshop.IDAL;

namespace TrainingWorkShop.BLL
{
    /// <summary>
    /// Author:Sissi Zeng
    /// Date:2012-08-19 9:45
    /// This class is  business unit of Course
    /// </summary>
    public class CourseBU
    {
        /// <summary>
        ///let factory to  Save Course Info 
        /// </summary>
        /// <param name="courseToSave"></param>
        public void UpdateCourse(Course courseToSave)
        {
            IFactory factory = new ApplicationContext().CreateFactory("EF");
            ICourseRepository courseRep=factory.CreateCourseRepository();
            courseRep.UpdateCourse(courseToSave);
        }
    }
}
